<?php !defined('IN_ONEZ') && exit('Access Denied');?>
document.writeln('<div id="qraccount">');
document.writeln('<h3>二维码闪电登录</h3>');
document.writeln('<img class="qrcode lightBorder" src="<?php echo $homepage?>/index.php?action=qrcode&token=<?php echo $token?>" />');
document.writeln('<br /><a href="<?php echo $homepage?>/qraccount.apk">下载安卓版[二维码登录]</a> | <a href="<?php echo $homepage?>/index.php?action=bindusr" style="color:#cc0000" target="_blank">绑定账号</a>');
document.writeln('</div>');
function update(){
  $.ajax({
    url:'<?php echo $homepage?>/index.php',
    type:'post',
    cache: false,
    dataType:'html',
    data:{action:'update',token:'<?php echo $token?>'},
    success:function(data){
      if(data=='Y'){
        window.location.href='<?php echo $homepage?>/index.php?action=synlogin&token=<?php echo $token?>';
      }
    }
  });
}
window.setInterval("update()",2000);